# the minimum version of CMake.
cmake_minimum_required(VERSION 3.5.0)
project(HLion)

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

# ld.lld: error: undefined symbol: main
SET(CMAKE_EXE_LINKER_FLAGS "-mcpu=cortex-m3 -mthumb -Wall -Wextra -Wno-missing-field-initializers -g -nostartfiles" CACHE INTERNAL "exe link flags")

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/include)
# 添加所有的c文件
# FILE(GLOB SRC_FILE_C ${NATIVERENDER_ROOT_PATH}/*.c)

# 添加所有的cpp文件
#FILE(GLOB SRC_FILE_CPP ${NATIVERENDER_ROOT_PATH}/*.cpp)
# 可执行文件
#add_executable(${PROJECT_NAME} ${SRC_FILE_C})

# 设置可执行文件目录
aux_source_directory(${NATIVERENDER_ROOT_PATH}/include SRC_DIR)

add_library(hl_crypto SHARED napi_init.cpp ${SRC_DIR})
target_link_libraries(hl_crypto PUBLIC libace_napi.z.so)
#list(APPEND OHOS_C_COMPILER_FLAGS -march=armv7a)